/*
package com.aierjun.testservice;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.annotation.StringRes;
import android.support.v7.app.AppCompatActivity;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;

*/
/**
 * Created by Administrator on 2016/6/29.
 *//*

public class CaseInfoEntity {
    @Override
    public String toString() {
        return "CaseInfoEntity{" +
                "nu='" + nu + '\'' +
                ", com='" + com + '\'' +
                ", ischeck='" + ischeck + '\'' +
                ", status='" + status + '\'' +
                ", condition='" + condition + '\'' +
                ", state='" + state + '\'' +
                ", data=" + data +
                '}';
    }

    private String nu;
    private String com;
    private String ischeck;
    private String status;

    private static final String KRY_NU="nu";
    private static final String KEY_COM="com";
    private  static  final String KEY_ISCHECK="ischeck";
    private  static final  String KEY_STATUS="status";
    private static final String KEY_DATA="data";

    public static CaseInfoEntity parseFromJSON(String jsonStr){
        CaseInfoEntity caseInfoEntity=new CaseInfoEntity();
        try {
            JSONObject jsonObject=new JSONObject(jsonStr);
            caseInfoEntity.setNu(jsonObject.getString(KRY_NU));
            caseInfoEntity.setCom(jsonObject.getString(KEY_COM));
            caseInfoEntity.setIscheck(jsonObject.getString(KEY_ISCHECK));
            caseInfoEntity.setStatus(jsonObject.getString(KEY_STATUS));
            JSONArray jsonArray=jsonObject.getJSONArray(KEY_DATA);
            if (jsonArray.length()>0){
                List<LogisticsInformation> logisticsInformation=new ArrayList<>();
                for (int i=0;i<jsonArray.length();i++)
                    logisticsInformation.add(LogisticsInformation.parseFromJosn1(JSONArray.getJSONObject(i)));
            }
            caseInfoEntity.setData(logisticsInformation);
        } catch (JSONException e) {
            e.printStackTrace();
        }return null;
    }
    public String getNu() {
        return nu;
    }

    public void setNu(String nu) {
        this.nu = nu;
    }

    public String getCom() {
        return com;
    }

    public void setCom(String com) {
        this.com = com;
    }

    public String getIscheck() {
        return ischeck;
    }

    public void setIscheck(String ischeck) {
        this.ischeck = ischeck;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getCondition() {
        return condition;
    }

    public void setCondition(String condition) {
        this.condition = condition;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public List<LogisticsInformation> getData() {
        return data;
    }

    public void setData(List<LogisticsInformation> data) {
        this.data = data;
    }

    private String condition;
    private String state;
    private List<LogisticsInformation> data;


    class LogisticsInformation{
        public String getContext() {
            return context;
        }

        public void setContext(String context) {
            this.context = context;
        }

        public String getFtime() {
            return ftime;
        }

        public void setFtime(String ftime) {
            this.ftime = ftime;
        }

        public String getTime() {
            return time;
        }

        public void setTime(String time) {
            this.time = time;
        }

        private String context;
        private String ftime;
        private String time;

        private static final String KEY_CONTEXT="context";
        private static final String KEY_FTIME="ftime";
        private static final String KEY_TIME="time";


        public static LogisticsInformation parseFromJosn1(String Str){
            LogisticsInformation logisticsInformation=new LogisticsInformation();
            try {
                JSONObject jsonObject=new JSONObject(Str);
                logisticsInformation.setContext(jsonObject.getString(KEY_CONTEXT));
                logisticsInformation.setFtime(jsonObject.getString(KEY_FTIME));
                logisticsInformation.setTime(jsonObject.getString(KEY_TIME));
            } catch (JSONException e) {
                e.printStackTrace();
            }
            return logisticsInformation;
        }
        @Override
        public String toString() {
            return "LogisticsInformation{" +
                    "context='" + context + '\'' +
                    ", ftime='" + ftime + '\'' +
                    ", time='" + time + '\'' +
                    '}';
        }
    }
}
*/
